
	<div class="form-list">
		<?php admin_msg( $msg ); ?>
		<form name="list" action="<?php echo $form ?>" method="post">
		<div class="box-right">
			<strong>Hiển thị theo </strong>
            <input onclick="change_url( 'advertise/index/0' )" <?php if( $place_id == 0 ) echo 'checked="checked"'; ?> type="radio" name="place" value="0" /> <span>Trên đầu</span>
            <input onclick="change_url( 'advertise/index/1' )" <?php if( $place_id == 1 ) echo 'checked="checked"'; ?> type="radio" name="place" value="1" /> <span>Bên phải</span>
            <input onclick="change_url( 'advertise/index/3' )" <?php if( $place_id == 3 ) echo 'checked="checked"'; ?> type="radio" name="place" value="3" /> <span>Bên trái</span>
            <input onclick="change_url( 'advertise/index/2' )" <?php if( $place_id == 2 ) echo 'checked="checked"'; ?> type="radio" name="place" value="2" /> <span>Phía dưới</span>
            <input onclick="change_url( 'advertise/index/4' )" <?php if( $place_id == 4 ) echo 'checked="checked"'; ?> type="radio" name="place" value="4" /> <span>Chính giữa</span>
		</div>
		
		<div class="clear-all"></div>
		
		<table border="1" class="form-list-table">
			<tr>
				<th rowspan="2" width="50">TT</th>
				<th rowspan="2" class="title">Tên menu</th>
				<th colspan="3" width="195">Thông sô</th>
				<th colspan="3" width="195">Tùy chọn</th>
			</tr>
			<tr>
				<th width="65">Dạng</th>
				<th width="65">Width</th>
				<th width="65">height</th>
				<th width="65">Hiển thị</th>
				<th width="65">Sửa</th>
				<th width="65">Xóa</th>
			</tr>
			<?php 
			if ( $items ) {
				$k = 1;
				foreach ( $items as $item ) {
					
					$s = ( $item['status'] == 1 ) ? 'checked="checked"' : '';
					
					echo '<tr>';	
						echo '<td><input type="hidden" name="id_'.$k.'" value="'.$item['id'].'" /><input name="order_'.$k.'" value="'.$item['orders'].'" type="text" class="text text-numb2" /></td>';	
						echo '<td class="title">';	
							echo '<p class="adv-name"><a target="_blank" href="'.admin_gallery().$item['image'].'">'.$item['name'].'</a></p>';	
							if ( $item['link'] != 'http://' && $item['link'] != '' )
								echo '<p class="adv-link"><a href="'.$item['link'].'">'.$item['link'].'</a></p>';	
						echo '</td>';	
						echo '<td>'.$item['image_type'].'</td>';	
						echo '<td>'.$item['image_width'].'</td>';	
						echo '<td>'.$item['image_height'].'</td>';	
						echo '<td><input '.$s.' type="checkbox" name="status_'.$k.'" value="1" /></td>';	
						echo '<td><a href="'.admin_link( 'advertise/edit/'.$item['id'] ).'" class="edit"><img width="20" height="19" src="'.admin_img().'spacer.gif" alt="Sửa" /></a></td>';	
						echo '<td><a onclick="return confirm_del();" href="'.admin_link( 'advertise/del/'.$place_id.'/'.$p_current.'/'.$item['id'] ).'" class="del"><img width="20" height="20" src="'.admin_img().'spacer.gif" alt="Xóa" /></a></td>';	
					echo '</tr>';
					$k++;	
				}
				echo '<tr><td colspan="8" class="no-data"><input type="hidden" name="length" value="'.$k.'" />Tổng số <strong>'.$total.'</strong> banner quảng cáo</td></tr>';
			}else echo '<tr><td colspan="8" class="no-data">Chưa có tin nào được tạo</td></tr>';			
			?>			
		</table>
		
		<div class="box-right">
			<input type="submit" name="submit" value="Cập nhập" class="button" />
		</div>
		
		<div class="clear-all"></div>
		
		<?php 
		if ( $paging ) {
			echo '<div class="phantrang">';
				echo $paging ;
			echo '</div>';
		}
		?>	
		</form>
	</div>